//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.aidong.dao.wills;

import com.aidong.dao.base.OrderSet;
import com.aidong.dao.wills.BaseDao;
import com.aidong.model.wills.PayTypeCode;
import java.util.List;
import org.springframework.stereotype.Repository;

@Repository
public class PayTypeCodeDao extends BaseDao<PayTypeCode, String> {
	public PayTypeCodeDao() {
	}

	public List<PayTypeCode> getValidList() {
		String sqlww = "status=1";
		return this.queryList(sqlww, (Object[])null, (new OrderSet()).asc("sort").asc("code"), -1);
	}

	public boolean updateStatus(String code, int status) {
		String hql = "update PayTypeCode set status=:p1 where code=:p2";
		return this.updateByHql(hql, new Object[]{Integer.valueOf(status), code}) > 0;
	}
}
